﻿<phone:PhoneApplicationPage 
    x:Class="FinApp.Views.CreditCardSelectorPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:tiles="clr-namespace:FinApp.Controls.Tiles"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
    shell:SystemTray.BackgroundColor="#1c98d1">

    <!--LayoutRoot es la cuadrícula raíz donde se coloca todo el contenido de la página-->
    <Grid x:Name="LayoutRoot" Background="#1c98d1">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contiene el nombre de la aplicación y el título de la página-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="MIS TARJETAS" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Seleccione la tarjeta" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel. Colocar aquí el contenido adicional-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ScrollViewer>
                <ListBox x:Name="creditCardListBox" Margin="0,0,0,0" ItemsSource="{Binding CreditCards}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Orientation="Horizontal">
                                  <tiles:TileSlider TextSlidesFrom="Top" Foreground="#1c98d1" Title="{Binding Balance}" Text="{Binding Mode}" TextStyle="{StaticResource PhoneTextLargeStyle}" TileBackground="Gray" Size="85" ImageSource="/Yayego.Mobile.App;component/Resources/appbar.location.round.png" />
                                  <StackPanel>
                                      <TextBlock Text="{Binding Balance}" Foreground="White" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                      <TextBlock Text="{Binding Mode}" Foreground="Gray" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                  </StackPanel><Button Command="{Binding PaymentCommand}">Seleccionar</Button>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </ScrollViewer>
        </Grid>
    </Grid>
 
    <!--Código de ejemplo que muestra el uso de ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Botón 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Botón 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="Elemento de menú 1"/>
                <shell:ApplicationBarMenuItem Text="Elemento de menú 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
